<template>
    <div class="synopsis">
        <div class="synopsis-guide">
            <div class="synopsis-guide-describe">
                <hgroup>
                    <h2>
                        Design and Sell Your <br /> Branded Clothing
                    </h2>
                    <p>Where creativity meets quality.</p>
                </hgroup>
                <button type="primary" class="home-btn" @click="$router.push('/product')">
                    Start now <i class="iconfont icon-you"></i>
                </button>
                <ul>
                    <li>
                        <p>No Upfront Cost</p>
                        <p>Maximized Design Freedom</p>
                    </li>
                    <li>
                        <p>Fast Fulfillment</p>
                        <p>Premium Quality Guaranteed</p>
                    </li>
                </ul>
            </div>
            <figure>
                <img src="https://img.podpartner.com/static/images-20230202/header-section-root.png" alt="" />
                <div class="synopsis-design">
                    <figure></figure>
                </div>
            </figure>
        </div>
    </div>
</template>
<script>
export default {
    name: "HomeSynopsis",
    data () {
        return {}
    },
    methods: {},
    mounted () { }
}
</script>
<style scoped lang="scss">
@keyframes design {
    0% {
        opacity: 0;
        background-position: right bottom 20px;
        background-size: 80px 33px;
    }
    8% {
        opacity: 1;
    }
    16% {
        opacity: 1;
    }
    24% {
        opacity: 0;
        background-position: right bottom 20px;
        background-size: 80px 33px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design1.png');
    }
    25% {
        opacity: 0;
        background-position: 36px 35px;
        background-size: 86px 54px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design2.png');
    }
    33% {
        opacity: 1;
    }
    41% {
        opacity: 1;
    }
    49% {
        opacity: 0;
        background-position: 36px 35px;
        background-size: 86px 54px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design2.png');
    }
    50% {
        opacity: 0;
        background-position: left 44px top;
        background-size: 13px 25px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design3.png');
    }
    58% {
        opacity: 1;
    }
    66% {
        opacity: 1;
    }
    74% {
        opacity: 0;
        background-position: left 44px top;
        background-size: 13px 25px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design3.png');
    }
    75% {
        opacity: 0;
        background-position: left 3px top 43px;
        background-size: 24px 24px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design4.png');
    }
    83% {
        opacity: 1;
    }
    91% {
        opacity: 1;
    }
    99% {
        opacity: 0;
        background-position: left 3px top 43px;
        background-size: 24px 24px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design4.png');
    }
    100% {
        opacity: 0;
        background-position: right bottom 20px;
        background-size: 80px 33px;
        background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design1.png');
    }
}
.synopsis {
    width: 100%;
    padding: 40px 32px;
    // height: var(--home-screen-height);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Roboto;
    transition: all 0.3s;
    .synopsis-guide {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0 0;
        width: 100%;
        min-width: 1200px;
        max-width: 1336px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;

        .synopsis-guide-describe {
            margin-right: 210px;
            > hgroup {
                position: relative;
                height: 210px;
                margin-bottom: 60px;
                h2 {
                    position: absolute;
                    top: 0;
                    left: 0;
                    width: 760px;
                    font-size: 72px;
                    font-family: Roboto-Bold, Roboto;
                    font-weight: 400;
                    color: #181818;
                    line-height: 82px;
                }
                p {
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    width: 760px;
                    font-size: 22px;
                    font-weight: 400;
                    color: #555555;
                }
            }

            ul {
                margin-top: 88px;
                li {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    justify-content: space-around;
                    p {
                        margin-bottom: 12px;
                        display: flex;
                        flex-direction: row;
                        align-items: center;
                        position: relative;
                        padding: 0 0 0 18px;
                        width: 230px;
                        height: 28px;
                        line-height: 28px;
                        font-size: 16px;
                        font-weight: bold;
                        color: #333333;
                        white-space: nowrap;
                        &::before {
                            content: '';
                            display: block;
                            position: absolute;
                            left: 0;
                            width: 4px;
                            height: 4px;
                            background: #ea4c89;
                            border-radius: 4px;
                        }
                    }
                }
            }
        }

        & > figure {
            position: relative;
            width: 432px;
            height: 544px;
            overflow: hidden;
            img {
                width: 470px;
                height: 582px;
            }
            .synopsis-design {
                box-sizing: border-box;
                position: absolute;
                top: 82px;
                left: 72px;
                width: 134px;
                height: 164px;
                display: flex;
                flex-direction: row;
                align-items: center;
                justify-content: center;
                > figure {
                    position: relative;
                    overflow: hidden;
                    width: 172px;
                    height: 158px;
                    animation: design 16s linear infinite forwards;
                    background-image: url('https://img.podpartner.com/static/images-20230202/header-section-design1.png');
                    background-repeat: no-repeat;
                    background-position: right bottom 20px;
                    background-size: 80px 33px;
                }
            }
        }
    }
}

@media screen and (min-height: 544px) {
    .synopsis {
        height: var(--home-screen-height);
    }
}
@media screen and (max-width: 960px) {
    .synopsis {
        padding: 32px 14px 0 14px;
        height: auto;
        margin-bottom: 60px;
        .synopsis-guide {
            align-items: center;
            flex-direction: column;
            min-width: auto;
            .synopsis-guide-describe {
                width: 100%;
                max-width: 520px;
                margin: 0;
                & > hgroup {
                    height: auto;
                    margin-bottom: 32px;
                    * {
                        position: static !important;
                    }
                    h2 {
                        width: auto;
                        font-size: 34px;
                        line-height: 42px;
                        margin-bottom: 12px;
                        br {
                            display: none;
                        }
                    }
                    p {
                        width: auto;
                    }
                }
                & > button {
                    font-size: 18px;
                    padding: 0 18px;
                    width: auto;
                    height: 42px;
                }
                & > ul {
                    font-family: Roboto-Bold, Roboto;
                    justify-content: flex-start;
                    padding-left: 2px;
                    margin-top: 32px;
                    li {
                        p {
                            font-size: 16px;
                            width: 100%;
                        }
                    }
                }
            }
            .synopsis .synopsis-guide .synopsis-guide-describe ul li p {
                padding: 0 0 0 10px;
                font-size: 13px;
                width: 130px;
                &:nth-child(2) {
                    width: 201px;
                }
            }
            figure {
                display: flex;
                flex-direction: row;
                justify-content: center;
                width: 100%;
                height: 252px;
                img {
                    transform: translateX(36px);
                    width: 258px;
                    height: 298px;
                }
                .synopsis-design {
                    top: 42px;
                    left: 214px;
                    width: 72px;
                    height: 82px;
                    > figure {
                        display: none;
                    }
                }
            }
        }
    }
}
</style>
